home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr08 / myb_203.zip / MYB_203.ZIP / REPORT1.MRG < prev    next >
Text File  |  1993-05-04  |  1KB  |  44 lines

  1. <*
  2.    REPORT1.MRG - Sample merge print file for CONTACT database.
  3.    ~~~~~~~~~~~
  4.    Print a report for all customers with a rank less than 4.
  5.    This report will print one customer per page including all memo notes.
  6.  
  7.    NOTE: The statement below which begins with the hash mark (#) is only
  8.    evaluated ONCE! However, since the result of this function is assigned
  9.    to a memory variable, "_Date", it may be used later without needing to
  10.    re-evaluate the entire function (much faster).
  11.  
  12. >
  13. <# _Date := CMONTH(DATE()) +" "+ ALLTRIM(STR(DAY(DATE()))) +","+ STR(YEAR(DATE())) >
  14. < LOCATE( "!EMPTY(RANK) .AND. RANK \< '4'" ) >
  15.  
  16.  
  17. XYZ Company Inc.
  18. Preferred customer list (RANK \<= 3)
  19. Date of report: < _Date >
  20. --------------------------------------------------------------------------------
  21.  
  22. < TRIMLINES (
  23.      TRIM( TRIM (SAL)+" "+FIRST_NAME) +" "+ LAST_NAME +_LF +
  24.      TITLE     + _LF +
  25.      DEPARTMENT+ _LF +
  26.      COMPANY   + _LF +
  27.      ADDRESS_1 + _LF +
  28.      ADDRESS_2 + _LF +
  29.      TRIM (CITY)+ ", " + STATE + _LF +
  30.      ZIP_CODE  + _LF )
  31. >
  32. Phone: < PHONE_NO > Fax: < FAX_NO >
  33. Date of last fax: < LAST_FAX >  Last call: < LAST_CALL >  Follow up: < FOLLOW_UP >
  34. Rank: < RANK >  Current status: <TRIM(STATUS)> <IF(FAX, "", "DON'T FAX!")>
  35. Notes:
  36. <*
  37.  
  38.   The next line will print the memo, changing all soft carriage returns
  39.   CHR(141) to hard carriage returns CHR(13)
  40.  
  41. >
  42. < STRTRAN( NOTES, CHR(141), CHR(13) ) >
  43.  
  44.